using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace DataUp.Model
{

    [JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
	public partial class System_Area {

		/// <summary>
		/// 编号
		/// </summary>
		[JsonProperty, Column(DbType = "varchar(64)", IsPrimary = true)]
		public string Code { get; set; }

		/// <summary>
		/// 1:省，2:市，3:区县，4:街道
		/// </summary>
		[JsonProperty]
		public byte Depth { get; set; } = 0;

		[JsonProperty, Column(IsIdentity = true)]
		public int Id { get; set; }

		/// <summary>
		/// 纬度 
		/// </summary>
		[JsonProperty, Column(StringLength = 64)]
		public string LAT { get; set; }

		/// <summary>
		/// 1
		/// </summary>
		[JsonProperty]
		public byte leaf { get; set; } = 1;

		/// <summary>
		/// 经度
		/// </summary>
		[JsonProperty, Column(StringLength = 64)]
		public string LNG { get; set; }

		/// <summary>
		/// 名称
		/// </summary>
		[JsonProperty, Column(StringLength = 64)]
		public string Name { get; set; }

		/// <summary>
		/// 上一级Code
		/// </summary>
		[JsonProperty, Column(DbType = "varchar(64)")]
		public string ParentCode { get; set; }

		/// <summary>
		/// 简称
		/// </summary>
		[JsonProperty, Column(StringLength = 64)]
		public string ShortName { get; set; }

		/// <summary>
		/// 排序
		/// </summary>
		[JsonProperty]
		public int Sort { get; set; } = 0;

	}

}
